import requests
# song_url = 'https://www.kugou.com/song/'
# headers = {
#     "referer":"https://www.kugou.com/yy/html/search.html",
#      "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53"
# }
#
# resp = requests.get(song_url, headers=headers)
# datas = resp.json()
#https://www.kugou.com/yy/html/search.html
# url = 'https://www.kugou.com/yy/html/search.html#searchType=song&searchKeyWord=%E5%91%A8%E6%9D%B0%E4%BC%A6'
# resp = requests.get(url=url)
# print
song_url = "https://www.kugou.com/song/#hash=6D6BC2D6AE2B21943F810A2CD23E2260&album_id=966846"
headers = {
    "referer": "https://www.kugou.com/yy/html/search.html",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53"
}

with open("c.mp4", mode='wb')as f:
    f.write(requests.get(song_url).content)
print('完毕')